<!--
 * @Author: 罗微
 * @Date: 2020-09-22 15:41:09
 * @LastEditors: MiNine
 * @LastEditTime: 2020-09-23 20:28:08
 * @Description: 
-->
<template>
  <div class="sector">
    <el-form ref="form" :model="form" label-width="100px">
      <el-form-item label="理赔订单号">
        <el-input v-model="form._id" disabled></el-input>
      </el-form-item>
      <el-form-item label="提交理赔凭证">
        <el-input v-model="form.voucher"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="thisAddClaimOrder">立即新增</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import { createNamespacedHelpers } from "vuex";
const { mapActions } = createNamespacedHelpers("claimOrder");
export default {
  data() {
    return {
      form: {
        _id: this.$route.params.insureOrderId,
        voucher: "",
      },
    };
  },
  methods: {
    ...mapActions(["updateClaimOrder"]),
    thisAddClaimOrder() {
      this.updateClaimOrder({
        insureOrderId: this.form._id,
        update: {
          voucher: this.form.voucher,
        },
      });
    },
  },
};
</script>

<style lang="scss" scoped>
@import "../../assets/scss/public/sector.scss";
</style>
